module.exports = (app) => {
  const { router, controller, middleware: { jwtVerify, lastTime} } = app;
  
  router.post("/admin/user/login", jwtVerify(), lastTime(), controller.user.login);
  router.get("/admin/user/info", jwtVerify(), lastTime(), controller.user.info);
  router.get("/admin/user/logout", jwtVerify(), lastTime(), controller.user.logout);
  router.post("/admin/user/add", jwtVerify(), lastTime(), controller.user.add);
  router.post("/admin/user/edit", jwtVerify(), lastTime(), controller.user.edit);
  router.get("/admin/user/list", jwtVerify(), lastTime(), controller.user.list);
  router.post("/admin/user/delete", jwtVerify(), lastTime(), controller.user.delete);
  router.post("/admin/user/role/add", jwtVerify(), lastTime(), controller.user.add_role);
  // router.post("/admin/user/role/menu", jwtVerify(), lastTime(), controller.user.add_menu);
  
  router.post(
    "/api/login/test-token",
   jwtVerify(),
   lastTime(),
    controller.user.testToken
  );
};
